<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="jquery-3.7.1.min.js"></script>
</head>
<body>
    <input type="button" value="get方法" onclick="test_get()">
    <input type="button" value="get方法str" onclick="test_get_str()">
    <input type="button" value="get方法json" onclick="test_get_json()">
    <script>
        function test_get(){
            $.get(
                    'http://httpbin.org/get',
                    function (data){
                        console.log(data)
                    }
            )
        }

        function test_get_str(){
            $.get(
                    'http://httpbin.org/get',
                    'name=sxt&pwd=123',
                    function (data){
                        console.log(data)
                    }
            )
        }

        function test_get_json(){
            $.get(
                    'http://httpbin.org/get',
                    {'name':'sxt','pwd':123},
                    function (data){
                        console.log(data)
                    }
            )
        }

    </script>
</body>
</html>